/**
 * The MIT License	
 * 
 * Copyright (c) 2009 Ghost Interactive
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 * 
 * ghostinteractive@gmail.com
 * http://ghostinteractive.net/blog
 * @author Jeremy brown
 */

package net.ghostinteractive.overlays
{
	import flash.display.Sprite;
	import flash.geom.Point;
	
	public class Hotspot extends Sprite
	{
		/**
		 *	The x & y coordinates of the overlay relative to the original image size
		 */
		protected var _position:Point;
		public function get position():Point { return _position; }
		
		/**
		 *	The optimal zoom depth for this overlay
		 */
		protected var _zoom:Number;
		public function get zoom():Number { return _zoom; }
		
		/**
		 * 	Value used to offset the x position of the viewport when panned to this overlay
		 *  Value should be in stage coordinate space relative to the original size of the image
		 */
		protected var _xoffset:Number;
		public function set xoffset( value:Number ):void { _xoffset = value };
		public function get xoffset():Number { return _xoffset };
		
		/**
		 * 	Value used to offset the y position of the viewport when panned to this overlay
		 *  Value should be in stage coordinate space
		 */
		protected var _yoffset:Number;
		public function set yoffset( value:Number ):void { _yoffset = value };
		public function get yoffset():Number { return _yoffset };
		
		/**
	 	 * Constructor
	 	 * AbstractOverlay provides a basic programming interface for custom overlays
	 	 * Overlays are non-scaling visual elements that maintain x & y coordinates relative to the original
	 	 * size of the zoom image
	 	 */
		public function Hotspot()
		{
			super();
			_xoffset 	= 0;
			_yoffset 	= 0;
			_zoom		= 0;
			_position 	= new Point();
		}
		
		/**
		 * Override this method to remove listeners, clear graphics, dispose of bitmaps
		 */
		public function destroy():void { /* override w/ sub-class */ }
	}
}